package de.dhbw.karlsruhe.picsim.gui.renderer;

import de.dhbw.karlsruhe.picsim.gui.data.OpCodeGui;

import javax.swing.*;
import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: user
 * Date: May 4, 2010
 * Time: 4:33:29 PM
 */
@SuppressWarnings({"ReturnOfThis"})
public class BreakPointRenderer extends ProgramRenderingSupport {
    @Override
    protected JComponent getRenderingComponent(OpCodeGui opcode, JTable jtable, int row, int column) {
        final boolean breakPoint = opcode.hasBreakPoint();

        if (breakPoint) {
            setBackground(Color.RED);
            setText("");
        } else {
            setText("");
        }
        return this;
    }
}
